home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / usr / src / linux-headers-2.6.28-15 / include / linux / eventfd.h < prev    next >
Encoding:
C/C++ Source or Header  |  2008-12-24  |  618 b   |  33 lines

  1. /*
  2.  *  include/linux/eventfd.h
  3.  *
  4.  *  Copyright (C) 2007  Davide Libenzi <davidel@xmailserver.org>
  5.  *
  6.  */
  7.  
  8. #ifndef _LINUX_EVENTFD_H
  9. #define _LINUX_EVENTFD_H
  10.  
  11. #ifdef CONFIG_EVENTFD
  12.  
  13. /* For O_CLOEXEC and O_NONBLOCK */
  14. #include <linux/fcntl.h>
  15.  
  16. /* Flags for eventfd2.  */
  17. #define EFD_CLOEXEC O_CLOEXEC
  18. #define EFD_NONBLOCK O_NONBLOCK
  19.  
  20. struct file *eventfd_fget(int fd);
  21. int eventfd_signal(struct file *file, int n);
  22.  
  23. #else /* CONFIG_EVENTFD */
  24.  
  25. #define eventfd_fget(fd) ERR_PTR(-ENOSYS)
  26. static inline int eventfd_signal(struct file *file, int n)
  27. { return 0; }
  28.  
  29. #endif /* CONFIG_EVENTFD */
  30.  
  31. #endif /* _LINUX_EVENTFD_H */
  32.  
  33.